/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vetxsoft.bean;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import vetxsoft.entity.HistoriaClinica;
import vetxsoft.system.IVetexsoftSystem;

/**
 *
 * @author Andrés
 */
@ManagedBean
@SessionScoped
public class HistoriaClinicaBean implements Serializable {

    @EJB
    private IVetexsoftSystem vetexsoftSystem;
    private HistoriaClinica historiaclinica = new HistoriaClinica();
    private Date currentDate = new Date();
    private boolean stored = false;

    public HistoriaClinicaBean() {
    }

    public HistoriaClinica getHistoriaclinica() {
        return historiaclinica;
    }

    public void setHistoriaclinica(HistoriaClinica historiaclinica) {
        this.historiaclinica = historiaclinica;
    }

    public Date getCurrentDate() {
        return currentDate;
    }

    public void setCurrentDate(Date currentDate) {
        this.currentDate = currentDate;
    }

    public boolean isStored() {
        return stored;
    }

    public void setStored(boolean stored) {
        this.stored = stored;
    }

    public IVetexsoftSystem getVetexsoftSystem() {
        return vetexsoftSystem;
    }

    public List<HistoriaClinica> obtenerHistorias() {
        try {

            return this.vetexsoftSystem.obtenerHistoriaClinica();

        } catch (Exception ex) {
            return null;
        }
    }
}
